<!--
 * @Descripttion:
 * @version:
 * @Author: zhangfan
 * @email: 2207044692@qq.com
 * @Date: 2020-06-02 09:21:14
 * @LastEditors: younghxp
 * @LastEditTime: 2021-11-11 15:30:38
-->
<template>
  <component v-bind:is="currentComponent"></component>
</template>

<script>
import loginFirstEs from '@/components/login/loginFirstEs'
import loginFirstNm from '@/components/login/loginFirstNm'
import loginFirstCommon from '@/components/login/loginFirstCommon'
import loginNextVue from './loginNext.vue'

export default {
  components: {
    loginFirstEs,
    loginFirstNm,
    loginFirstCommon,
    loginNextVue,
  },
  data() {
    return {
      currentComponent: '',
      groupList: [
        { name: '恩施登录页', componentName: 'loginFirstEs' },
        { name: '内蒙登录页', componentName: 'loginFirstNm' },
        { name: '区域通用登录页', componentName: 'loginFirstCommon' },
        { name: '长春登录页', componentName: 'loginNextVue' },
      ],
    }
  },
  created() {
    //用于缓存恩施项目列表查询条件20201020
    window.localStorage.removeItem('filterField')
    if (this.isEsUser()) {
      this.currentComponent = loginFirstEs
    } else if (this.isNmUser()) {
      this.currentComponent = loginFirstNm
    } else if (this.isCCUser()) {
      this.currentComponent = loginNextVue
    } else {
      this.currentComponent = loginFirstCommon
    }

    var host = window.location.host
    var domain = host.split(':')[0]
    if (domain == '192.168.9.180') {
      this.currentComponent = loginFirstCommon
    }
  },
  methods: {},
}
</script>

<style scoped lang="less"></style>
